#!/user/bin/env python
# -*- coding: utf-8 -*-
import logging

logging.basicConfig(filename='log.log', level=logging.DEBUG,
                    format='%(asctime)s  %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
                    datefmt='%a, %d %b %Y %H:%M:%S')


# 设置默认编码为utf8
def setup_coding():
    import sys
    if sys.version_info.major < 3:
        reload(sys)
    sys.setdefaultencoding('utf8')
